Skip to content

Add a GET /health endpoint that returns { status: 'ok', uptime: process.uptime()#325

Open
shivammittal274 wants to merge 2 commits intomainfrom
feat/dPDII2OA-add-a-get-health-endpoint-that-returns--
Open

Add a GET /health endpoint that returns { status: 'ok', uptime: process.uptime()#325
shivammittal274 wants to merge 2 commits intomainfrom
feat/dPDII2OA-add-a-get-health-endpoint-that-returns--

Conversation

@shivammittal274
Copy link
Contributor

Summary

Add a GET /health endpoint that returns { status: 'ok', uptime: process.uptime() } to the main server

Changes

apps/server/src/api/routes/health.ts        | 2 +-
 apps/server/tests/api/routes/health.test.ts | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Agent Metadata

  • Total cost: $1.2089
  • Stages:
    • ok setup ($0.0000, 40.8s)
    • ok plan ($0.7489, 130.9s)
    • ok implement ($0.4599, 115.6s)

Generated by coding-agent v3

BrowserOS Coding Agent added 2 commits February 11, 2026 13:05
@github-actions
Copy link
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement.

To sign the CLA, please add a comment to this PR with the following text:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once. After signing, this check will pass automatically.


Troubleshooting
  • Already signed but still failing? Comment recheck to trigger a re-verification.
  • Signed with a different email? Make sure your commit email matches your GitHub account email, or add your commit email to your GitHub account.
- - - I have read the CLA Document and I hereby sign the CLA - - - **BrowserOS Coding Agent** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).
You can retrigger this bot by commenting **recheck** in this Pull Request. Posted by the **CLA Assistant Lite bot**.

@claude
Copy link

claude bot commented Feb 11, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR adds an uptime field to the /health endpoint that returns process.uptime() to track how long the server has been running.

Key changes:

  • Enhanced health endpoint to return { status: 'ok', uptime: process.uptime() }
  • Updated tests to validate uptime is a number ≥ 0
  • Added .agent/ to .gitignore for coding agent artifacts

The implementation is clean and follows existing patterns. Tests properly validate the new field without hardcoding expected values.

Confidence Score: 5/5

  • This PR is safe to merge with no risks
  • The changes are minimal, well-tested, and follow existing patterns. Adding process.uptime() is a safe Node.js API call that returns server runtime in seconds. Tests properly validate the new field.
  • No files require special attention

Important Files Changed

Filename Overview
.gitignore Added .agent/ to ignore coding agent artifacts - clean infrastructure change
apps/server/src/api/routes/health.ts Added uptime: process.uptime() to health endpoint response - clean implementation
apps/server/tests/api/routes/health.test.ts Updated test to validate uptime field is number ≥ 0 - thorough test coverage

Sequence Diagram

sequenceDiagram
    participant Client
    participant HealthRoute
    participant Process
    
    Client->>HealthRoute: GET /health
    HealthRoute->>Process: process.uptime()
    Process-->>HealthRoute: uptime (seconds)
    HealthRoute-->>Client: { status: 'ok', uptime: <number> }
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant